<template>
    <div class="basis-info" style="width: 100%;">
        <Form ref="formData" :model="formData" :label-width="100">
            <Row>
                <Col :xs="24" :md="12" :lg="8" :xl="6">
                    <FormItem label="申请时间">
                        <Input type="text" v-model="formData.applyDate" disabled/>
                    </FormItem>
                </Col>
                <Col :xs="24" :md="12" :lg="8" :xl="6">
                    <FormItem label="结束时间">
                        <Input type="text" v-model="formData.endDate" disabled/>
                    </FormItem>
                </Col>
                <Col :xs="24" :md="12" :lg="8" :xl="6">
                    <FormItem label="创建人">
                        <Input type="text" v-model="applyBy1" disabled/>
                    </FormItem>
                </Col>
                <Col :xs="24" :md="12" :lg="8" :xl="6">
                    <FormItem label="案件编号">
                        <Input type="text" v-model="formData.caseNo" disabled/>
                    </FormItem>
                </Col>
            </Row>
        </Form>
    </div>
</template>
<script>
    import {getUserListData} from "_p/basic/api/admin/user";

    export default {
        // 基本信息
        name: "BaseInfo",
        props: {
            formData:{
                type:Object,
                default:() =>{

                }
            }
        },
        data() {
            return {
                applyBy1:'',
            };
        },
        watch:{
            formData:{
                handler(val){
                    if(val.createBy){
                        this.getUserList()
                    }
                },
                immediate: true,
                deep: true
            }
        },
        mounted() {
        },
        methods: {
            init() {
            },
            getUserList() {
                // 多条件搜索用户列表
                this.loading = true;
                let searchForm = {};
                if(!this.formData.createBy){
                    return ;
                }
                searchForm.username = this.formData.createBy;
                searchForm.pageSize = 10;
                searchForm.pageNumber = 1;
                getUserListData(searchForm).then(res => {
                    if (res.code === "0000") {
                        this.applyBy1 = res.data.records[0].userRealName;
                    }
                });
            },

        }
    };
</script>
<style scoped>
    .basis-info>>>.ivu-input[disabled]{
        color: black;
    }
    .basis-info>>>.ivu-select-disabled .ivu-select-selected-value{
        color:#515a6e;
    }
    .basis-info>>>.ivu-input-number-input[disabled]{
        color:black;
    }
</style>
